#ifndef SVGWIDGET_H
#define SVGWIDGET_H

#include <QWidget>
#include <QSvgRenderer>
#include <QPainter>
#include <QResizeEvent>

class SvgWidget : public QWidget
{
    Q_OBJECT

public:
    SvgWidget(QWidget *parent = nullptr);

    void setSvgFile(const QString &filePath);

protected:
    void paintEvent(QPaintEvent *event) override;
    void resizeEvent(QResizeEvent *event) override;

private:
    QSvgRenderer svgRenderer;
    QString currentFilePath;
};

#endif // SVGWIDGET_H
